package com.zh.system.service;

import com.zh.system.domain.dto.AskAiDto;
import com.zh.system.domain.dto.CrawlDto;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

public interface SystemService {

    void deleteAllExpireData() throws InterruptedException;

    void deleteSystemData();

    void deleteUserData();

    /**
     * 操作爬虫
     *
     * @param crawlDto
     * @return
     */
    String switchCrawl(CrawlDto crawlDto);

    /**
     * 询问ai
     *
     * @return
     * @throws IOException
     */
    SseEmitter askAi(Long id) throws IOException;

    /**
     * 预检参数
     *
     * @param askAiDto
     * @return
     */
    String receiveKeywordBeforeAskAi(AskAiDto askAiDto, HttpServletRequest request);
}
